/**
 * 
 */
package ru.olympus.antonyhands.ao.shared.util;

/**
 * @author AntonyHands
 * @since 29.02.2012
 */
public class LongUtilities {

	public static Long getMax(Long... values)
	{
		Long res = null;
		for (Long l : values)
			if (l != null)
			{
				if (res == null)
					res = l;
				else if (res < l)
					res = l;
			}
		return res;
	}

	public static Long getMin(Long... values)
	{
		Long res = null;
		for (Long l : values)
			if (l != null)
			{
				if (res == null)
					res = l;
				else if (res > l)
					res = l;
			}
		return res;
	}
	
	public static boolean equals(Long value1, Long value2)
	{
		if (value1 == null)
			return false;
		if (value2 == null)
			return false;
		return value1.equals(value2);
	}
}
